/**
 * 路由相关类型定义
 */
import { ReactNode } from 'react';

/**
 * 路由项
 */
export interface RouteItem {
  path: string;
  element?: ReactNode;
  children?: RouteItem[];
  redirect?: string;
  meta?: RouteMeta;
}

/**
 * 路由元信息
 */
export interface RouteMeta {
  title: string;
  icon?: ReactNode;
  hidden?: boolean;
  auth?: boolean;
  permissions?: string[];
  roles?: string[];
  keepAlive?: boolean;
  target?: '_blank' | '_self';
  order?: number;
}

/**
 * 菜单项
 */
export interface MenuItem {
  key: string;
  label: string;
  icon?: ReactNode;
  children?: MenuItem[];
  path: string;
  target?: string;
  permissions?: string[];
  roles?: string[];
  disabled?: boolean;
  hidden?: boolean;
} 